<template>
    <Modal :mask-closable="false"
            title="批量设置功能位置"
            v-model="positioinVisible"
            class="modal-content-layout"
    >
        <Form ref="positionForm"  label-position="top">
          <FormItem :label="`${$t('fault.FunctionalLocation')}:`" class="item">
                <Cascader  :data="orgList" v-model="position" :transfer="true"
                ></Cascader>
            </FormItem>
        </Form>
        <div slot="footer">
            <Button type="default" @click="handleCancel">{{$t('common.Cancle')}}</Button>
            <Button type="primary" @click="handleOk">{{$t('maintenance.Confirmed')}}</Button>
        </div>
    </Modal>
</template>

<script>
    export default {
        name: "positionModal",
        props: ['orgList'],
        data() {
            return {
                positioinVisible: false,
                position: []
            }
        },
        methods: {
            show() {
                this.positioinVisible = true
                this.position = []
            },
            handleOk() {
                this.positioinVisible = false
                this.$emit('getPositionValue', this.position)
            },
            handleCancel() {
                this.positioinVisible = false
            }
        }
    }
</script>

<style scoped>

</style>
